
<div align="center">
<table border="0" cellspacing="0" cellpadding="0" class="tblbg">
	<tr>
		<td>
		<table border="0" cellspacing="1">
			<tr>
				<td colspan="3" class="tbltop">&nbsp;<?=$T['menu'][$url];?>&nbsp;</td>
			</tr>
			<tr>
				<td class="row1"><b>&nbsp;<?=$T['Reseller Name'];?>&nbsp;</b></td>
				<td colspan="2" class="row2">&nbsp;<?=$resellerdata['name'];?>&nbsp;</td>
			</tr>
			<tr>
				<td class="row1"><b>&nbsp;<?=$T['E-Mail Address'];?>&nbsp;</b></td>
				<td colspan="2" class="row2">&nbsp;<a href="mailto:<?=$resellerdata['email'];?>"><?=$resellerdata['email'];?></a>&nbsp;</td>
			</tr>
			<tr>
				<td class="row1"><b>&nbsp;<?=$T['IP Addresses'];?>&nbsp;</b></td>
				<td colspan="2" class="row2">&nbsp;<?=str_replace(" ", "<br>\n&nbsp;", $resellerdata['ip']);?></td>
			</tr>
			<tr><? $tmp = fetchdata("domains","total",$resellerdata['id']); $tmp = intval($tmp['domains']); ?>
				<td class="row1"><nobr><b>&nbsp;<?=$T['Num Domains'];?>&nbsp;</b></nobr></td>
				<? if ($resellerdata['domains'] != -1) { ?>
					<td colspan="2" class="row2">&nbsp;<?=$tmp;?> / <?=$resellerdata['domains'];?> (<?=(round($tmp / $resellerdata['domains'] * 100,2));?>%)&nbsp;</td>
				<? } else { ?>
					<td class="row2" colspan=2><div align=center><?=$tmp;?> / <?=$T['Unlimited'];?></div></td>
				<? } ?>
			</tr>
			<tr>
				<td class="row1"><div class="small">&nbsp;</div></td>
				<td class="row1"><div class="small">&nbsp;<?=$T['Allocated'];?>&nbsp;</div></td>
				<td class="row1"><div class="small">&nbsp;<?=$T['Real'];?>&nbsp;</div></td>
			</tr>
			<?
			$tmp = fetchdata("hd","alloc",$resellerdata['id']);
			$tmp = intval($tmp['hd']);
			$tmp1 = fetchdata("hd","total",$resellerdata['id']);
			$tmp1 = intval($tmp1['hd']);
			?>
			<tr>
				<td class="row1"><nobr><b>&nbsp;<?=$T['Hard Disk Usage'];?> (<?=$T['mb'];?>)&nbsp;</b></nobr></td>
				<td class="row2">&nbsp;<?=$tmp;?> / <?=(($resellerdata['hd'] != -1) ? $resellerdata['hd'] : $T['Unlim']);?>&nbsp;</td>
				<td class="row2">&nbsp;<?=$tmp1;?><?=(($resellerdata['hd'] != -1) ? " / ".$resellerdata['hd'] : "");?>&nbsp;</td>
			</tr>
			<?
			$tmp = fetchdata("users","alloc",$resellerdata['id']);
			$tmp = intval($tmp['users']);
			$tmp1 = fetchdata("users","total",$resellerdata['id']);
			$tmp1 = intval($tmp1['users']);
			?>
			<tr>
				<td class="row1"><b>&nbsp;<?=$T['Users'];?>&nbsp;</b></td>
				<td class="row2">&nbsp;<?=$tmp;?> / <?=(($resellerdata['users'] != -1) ? $resellerdata['users'] : $T['Unlim']);?>&nbsp;</td>
				<td class="row2">&nbsp;<?=$tmp1;?><?=(($resellerdata['users'] != -1) ? " / ".$resellerdata['users'] : "");?>&nbsp;</td>
			</tr>
			<?
			$tmp = fetchdata("subdomains","alloc",$resellerdata['id']);
			$tmp = intval($tmp['subdomains']);
			$tmp1 = fetchdata("subdomains","total",$resellerdata['id']);
			$tmp1 = intval($tmp1['subdomains']);
			?>
			<tr>
				<td class="row1"><b>&nbsp;<?=$T['Subdomains'];?>&nbsp;</b></td>
				<td class="row2">&nbsp;<? if ($resellerdata['subdomains']) { ?><?=$tmp;?> / <?=(($resellerdata['subdomains'] != -1) ? $resellerdata['subdomains'] : $T['Unlim']);?><? } else echo $T['none'];?>&nbsp;</td>
				<td class="row2">&nbsp;<? if ($resellerdata['subdomains']) { ?><?=$tmp1;?><?=(($resellerdata['subdomains'] != -1) ? " / ".$resellerdata['subdomains'] : "");?><? } else echo $T['none'];?>&nbsp;</td>
			</tr>
			<?
			$tmp = fetchdata("pointers","alloc",$resellerdata['id']);
			$tmp = intval($tmp['pointers']);
			$tmp1 = fetchdata("pointers","total",$resellerdata['id']);
			$tmp1 = intval($tmp1['pointers']);
			?>
			<tr>
				<td class="row1"><nobr><b>&nbsp;<?=$T['Domain Pointers'];?>&nbsp;</b></nobr></td>
				<td class="row2">&nbsp;<? if ($resellerdata['pointers']) { ?><?=$tmp;?> / <?=(($resellerdata['pointers'] != -1) ? $resellerdata['pointers'] : $T['Unlim']);?><? } else echo $T['none'];?>&nbsp;</td>
				<td class="row2">&nbsp;<? if ($resellerdata['pointers']) { ?><?=$tmp1;?><?=(($resellerdata['pointers'] != -1) ? " / ".$resellerdata['pointers'] : "");?><? } else echo $T['none'];?>&nbsp;</td>
			</tr>
			<?
			$tmp = fetchdata("db","alloc",$resellerdata['id']);
			$tmp = intval($tmp['db']);
			$tmp1 = fetchdata("db","total",$resellerdata['id']);
			$tmp1 = intval($tmp1['db']);
			?>
			<tr>
				<td class="row1"><b>&nbsp;<?=$T['Databases'];?>&nbsp;</b></td>
				<td class="row2">&nbsp;<? if ($resellerdata['db']) { ?><?=$tmp;?> / <?=(($resellerdata['db'] != -1) ? $resellerdata['db'] : $T['Unlim']);?><? } else echo $T['none'];?>&nbsp;</td>
				<td class="row2">&nbsp;<? if ($resellerdata['db']) { ?><?=$tmp1;?><?=(($resellerdata['db'] != -1) ? " / ".$resellerdata['db'] : "");?><? } else echo $T['none'];?>&nbsp;</td>
			</tr>
			<?
			$ret = Array('resellerdata' => $domaindata, 'entries' => Array());
			call_hook('web:reseller:resellerinfo:table', $ret);
			if (is_array($ret['entries'])) {
			foreach($ret['entries'] as $item) {
				$tmp = fetchdata($item['fieldname'],"alloc",$resellerdata['id']);
            	$tmp = intval($tmp[$item['fieldname']]);
            	$tmp1 = fetchdata($item['fieldname'],"total",$resellerdata['id']);
            	$tmp1 = intval($tmp1[$item['fieldname']]);
			?>
			<tr>
               	<td class="row1"><b>&nbsp;<?=$item['label'];?>&nbsp;</b></td>
               	<td class="row2">&nbsp;<? if ($resellerdata[$item['fieldname']]) { ?><?=$tmp;?> / <?=(($resellerdata[$item['fieldname']] != -1) ? $resellerdata[$item['fieldname']] : $T['Unlim']);?><? } else echo $T['none'];?>&nbsp;</td>
               	<td class="row2">&nbsp;<? if ($resellerdata[$item['fieldname']]) { ?><?=$tmp1;?><?=(($resellerdata[$item['fieldname']] != -1) ? " / ".$resellerdata[$item['fieldname']] : "");?><? } else echo $T['none'];?>&nbsp;</td>
			</tr>
			<?
			}
			}
			?>
			<tr>
				<td class="row1"><b>&nbsp;<?=$T['Server Side Options'];?>&nbsp;</b></td>
				<td colspan="2" class="row2">
				<table border="0" cellpadding="0" summary="">
				<?
				if (strstr($cfg['sslang'],",")) $sslang = explode(",",$cfg['sslang']);
				else $sslang[0] = $cfg['sslang'];
				
				$j = 0;
				unset($tmpdata);
				while ($sslang[$j]) { 
					if (!$resellerdata['serverside'][trim($sslang[$j])])
						$resellerdata['serverside'][trim($sslang[$j])] = "off";
					?>
					<tr>
						<td class="row2">&nbsp;<?=$T['ss'][trim($sslang[$j])];?>&nbsp;</td>
						<td class="row2">&nbsp;<?=$T[$resellerdata['serverside'][trim($sslang[$j])]];?>&nbsp;</td>
					</tr>
				<? ++$j; } ?>
				</table></td>
			</tr>
		</table></td>
	</tr>
</table>
</div>
